<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Configuring Terrier</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="docs.css">
</head>

<body>
<!--!bodystart-->
[<a href="basicComponents.html">Previous: Terrier Components</a>] [<a href="index.html">Contents</a>] [<a href="configure_indexing.html">Next: Configuring Indexing</a>]
<table width="100%">
  <tr> 
    <td width="82%" valign="bottom"><h1>Configuring Terrier</h1></td>
	<!--!bodyremove-->
    <td width="18%"><a href="http://ir.dcs.gla.ac.uk/terrier/"><img src="images/terrier-logo-web.jpg" border="0"></a></td>
	<!--!/bodyremove-->
  </tr>
</table>

<p align="justify">

<h2>Configuring Overview</h2>
<p align="justify">
Terrier is configured overall by a few files, all in the <tt>etc/</tt> directory. Some of these contain information specific to various applications, such as <tt>collection.spec</tt> (indexing), or <tt>trec.models</tt> and <tt>trec.topics.list</tt> (TrecTerrier). However, the most central two files are <tt>terrier.properties</tt> and <tt>terrier-log.xml</tt>. In <tt>terrier.properties</tt>, you can specify any of the various properties that are defined in Terrier. The <a href="properties.html">Properties</a> documentation page lists these. The default <tt>terrier.properties</tt> file is given below:
</p>

<pre>
#directory names
terrier.home=/local/terrier

#default controls for query expansion
querying.postprocesses.order=QueryExpansion
querying.postprocesses.controls=qe:QueryExpansion

#default and allowed controls
querying.default.controls=c:1.0,start:0,end:999
querying.allowed.controls=c,scope,qe,qemodel,start,end

#document tags specification
#for processing the contents of
#the documents, ignoring DOCHDR
TrecDocTags.doctag=DOC
TrecDocTags.idtag=DOCNO
TrecDocTags.skip=DOCHDR

#query tags specification
TrecQueryTags.doctag=TOP
TrecQueryTags.idtag=NUM
TrecQueryTags.process=TOP,NUM,TITLE
TrecQueryTags.skip=DESC,NARR

#stop-words file
stopwords.filename=stopword-list.txt

#create a temporary lexicon after
#indexing bundle.size documents
bundle.size=2500

#the processing stages a term goes through
termpipelines=Stopwords,PorterStemmer
</pre>

<p align="justify">
In the terrier.properties file, properties are specified in the format <tt>name=value</tt>. Comments are lines starting with <tt>#</tt>.
</p>

<p></p>

<h3>Scripting Properties</h3>
<p align="justify">
When looking for properties, Terrier first checks the System properties provided by Java. This means that you can set any property on the command line. For example, to use index using no stemmer, you could use the command line:
</p>
<pre>
[user@machine]$ TERRIER_OPTIONS="-Dtermpipelines=Stopwords" bin/trec_terrier.sh -i
</pre>

<p align="justify">In another example, you can run Terrier using many settings for the <tt>expansion.terms</tt> property of query expansion:</p>
<pre>
[user@machine]$ for((i=2;i<10;i++)); do 
	TERRIER_OPTIONS="-Dexpansion.terms=$i" bin/trec_terrier.sh -r -q 
done
</pre>

<p></p>

<h3>Configuring Logging</h3>
<p align="justify">
Terrier now uses <a href="logging.apache.org/log4j/">Log4j</a> for logging. You can control the amount of logging information that Terrier outputs by altering the log4j config in <tt>etc/terrier-log.xml</tt>. For more information about configuring Log4j, see the <a href="http://logging.apache.org/log4j/docs/">Log4j documentation</a>.

<p></p>


[<a href="basicComponents.html">Previous: Terrier Components</a>] [<a href="index.html">Contents</a>] [<a href="configure_indexing.html">Next: Configuring Indexing</a>]
<!--!bodyend-->
<hr>
<small>
Webpage: <a href="http://ir.dcs.gla.ac.uk/terrier">http://ir.dcs.gla.ac.uk/terrier</a><br>
Contact: <a href="mailto:terrier@dcs.gla.ac.uk">terrier@dcs.gla.ac.uk</a><br>
<a href="http://www.dcs.gla.ac.uk/">Department of Computing Science</a><br>

Copyright (C) 2004-2008 <a href="http://www.gla.ac.uk/">University of Glasgow</a>. All Rights Reserved.
</small>
</body>
</html>
